package io.renren.modules.member.service.impl;

import io.renren.modules.member.dao.TStoreMemberConsumeRecordDao;
import io.renren.modules.member.entity.TStoreMemberConsumeRecordEntity;
import io.renren.modules.member.service.TStoreMemberConsumeRecordService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;




@Service("tStoreMemberConsumeRecordService")
public class TStoreMemberConsumeRecordServiceImpl extends ServiceImpl<TStoreMemberConsumeRecordDao, TStoreMemberConsumeRecordEntity> implements TStoreMemberConsumeRecordService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TStoreMemberConsumeRecordEntity> page = this.page(
                new Query<TStoreMemberConsumeRecordEntity>().getPage(params),
                new QueryWrapper<TStoreMemberConsumeRecordEntity>()
                .eq(params.get("memberId") != null,"member_id",params.get("memberId"))
                .eq("seller_id",params.get("sellerId"))
        );

        return new PageUtils(page);
    }

}